/*
 * Copyright 2010 bedatadriven
 *
 *    Licensed under the Apache License, Version 2.0 (the "License");
 *    you may not use this file except in compliance with the License.
 *    You may obtain a copy of the License at
 *
 *        http://www.apache.org/licenses/LICENSE-2.0
 *
 *    Unless required by applicable law or agreed to in writing, software
 *    distributed under the License is distributed on an "AS IS" BASIS,
 *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *    See the License for the specific language governing permissions and
 *    limitations under the License.
 */

/**
 * JacobGen generated file --- do not edit
 *
 * (http://www.bigatti.it/projects/jacobgen)
 */
package com.bedatadriven.mso.excel;

import com.bedatadriven.mso.core.MsoSyncEventType;
import com.google.gwt.core.client.JavaScriptObject;

/** Wrapper for Excel.WorkbookEvents*/
public class WorkbookEvents extends JavaScriptObject {

	protected WorkbookEvents() { }
	public native final void open()/*-{
		this.Open( );
	}-*/;

	public native final void activate()/*-{
		this.Activate( );
	}-*/;

	public native final void deactivate()/*-{
		this.Deactivate( );
	}-*/;

	public native final void beforeClose(boolean cancel)/*-{
		this.BeforeClose( cancel);
	}-*/;

	public native final void beforeSave(boolean saveAsUI, boolean cancel)/*-{
		this.BeforeSave( saveAsUI, cancel);
	}-*/;

	public native final void beforePrint(boolean cancel)/*-{
		this.BeforePrint( cancel);
	}-*/;

	public native final void newSheet(Object sh)/*-{
		this.NewSheet( sh);
	}-*/;

	public native final void addinInstall()/*-{
		this.AddinInstall( );
	}-*/;

	public native final void addinUninstall()/*-{
		this.AddinUninstall( );
	}-*/;

	public native final void windowResize(Window wn)/*-{
		this.WindowResize( wn);
	}-*/;

	public native final void windowActivate(Window wn)/*-{
		this.WindowActivate( wn);
	}-*/;

	public native final void windowDeactivate(Window wn)/*-{
		this.WindowDeactivate( wn);
	}-*/;

	public native final void sheetSelectionChange(Object sh, Range target)/*-{
		this.SheetSelectionChange( sh, target);
	}-*/;

	public native final void sheetBeforeDoubleClick(Object sh, Range target, boolean cancel)/*-{
		this.SheetBeforeDoubleClick( sh, target, cancel);
	}-*/;

	public native final void sheetBeforeRightClick(Object sh, Range target, boolean cancel)/*-{
		this.SheetBeforeRightClick( sh, target, cancel);
	}-*/;

	public native final void sheetActivate(Object sh)/*-{
		this.SheetActivate( sh);
	}-*/;

	public native final void sheetDeactivate(Object sh)/*-{
		this.SheetDeactivate( sh);
	}-*/;

	public native final void sheetCalculate(Object sh)/*-{
		this.SheetCalculate( sh);
	}-*/;

	public native final void sheetChange(Object sh, Range target)/*-{
		this.SheetChange( sh, target);
	}-*/;

	public native final void sheetFollowHyperlink(Object sh, Hyperlink target)/*-{
		this.SheetFollowHyperlink( sh, target);
	}-*/;

	public native final void sheetPivotTableUpdate(Object sh, PivotTable target)/*-{
		this.SheetPivotTableUpdate( sh, target);
	}-*/;

	public native final void pivotTableCloseConnection(PivotTable target)/*-{
		this.PivotTableCloseConnection( target);
	}-*/;

	public native final void pivotTableOpenConnection(PivotTable target)/*-{
		this.PivotTableOpenConnection( target);
	}-*/;

	protected native final void _sync( int syncEventType)/*-{
		this.Sync( syncEventType);
	}-*/;

	public final void sync(MsoSyncEventType syncEventType){
		_sync(syncEventType.getValue());
	}
	public native final void beforeXmlImport(XmlMap map, String url, boolean isRefresh, boolean cancel)/*-{
		this.BeforeXmlImport( map, url, isRefresh, cancel);
	}-*/;

	public native final void afterXmlImport(XmlMap map, boolean isRefresh, int result)/*-{
		this.AfterXmlImport( map, isRefresh, result);
	}-*/;

	public native final void beforeXmlExport(XmlMap map, String url, boolean cancel)/*-{
		this.BeforeXmlExport( map, url, cancel);
	}-*/;

	public native final void afterXmlExport(XmlMap map, String url, int result)/*-{
		this.AfterXmlExport( map, url, result);
	}-*/;

	public native final void rowsetComplete(String description, String sheet, boolean success)/*-{
		this.RowsetComplete( description, sheet, success);
	}-*/;

}
